package com.sjhang.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sjhang.entity.TbCounter;
import com.sjhang.mapper.TbCounterMapper;
import com.sjhang.service.TbCounterService;
import com.sjhang.utils.ListParamVo;
import com.sjhang.utils.ResultResponse;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 文章数据表   服务实现类
 *
 */
@Service
public class TbCounterServiceImpl extends ServiceImpl<TbCounterMapper, TbCounter> implements TbCounterService {

    @Resource
    private TbCounterMapper tbCounterMapper;

    /***
     * @description 查询自己的所有点赞与浏览
     * @params [userID]
     */
    @Override
    public ResultResponse selectCounter(Long userID) {
        ListParamVo ts =  tbCounterMapper.selectOnley(userID);
        return ResultResponse.SUCCESS(ts);
    }
}
